<include file="Public/head" title="我要出让"/>
<include file="Public/back_head"/>
<div class="main">
    <div class="select_shop_two clear">
        <img src="{$bike_info.goods_pic}" alt="">
        <div class="select_shop_right">
            <div class="title">{$bike_info.goods_name}</div>
            <div class="show">{:cut_str($bike_info['goods_profile'],20)}</div>
            <div class="money1 clear"><i class="iconfont icon-jiage-copy"></i>{$bike_info.order_price}</div>
            <div class="type">颜色:  {$bike_info.goods_spec}</div>
        </div>
    </div>
    <div class="type_one">
        商品金额 <span><i class="iconfont icon-jiage-copy"></i>{$bike_info.order_price}</span>
    </div>
    <div class="type_two">
        <div class="title">出让服务说明</div>
        <ul>
            <li>成功出让后，车辆的使用权将转移至对方的名下，车辆剩余的待支付的金额部分将由对方承担。</li>
            <li>成功出让后，将回退您购买车辆时支付的押金，但车辆的已付金额不会回退。 </li>
        </ul>
    </div>
    <div class="type_two">
        <div class="title">每天还款金额 <span class="color_19c4b4">￥<em>{$repayment.per_cash|default=0}</em></span></div>
        <div class="title">剩余还款天数 <span><em>{$repayment.remain_days}</em>天</span></div>
    </div>
    <form id="dataForm">
    <input type="hidden" name="info[bike_id]" value="{$bike_info.id}" />
    <input type="hidden" name="info[order_id]" value="{$bike_info.order_id}" />
    <input type="hidden" name="info[turn_user]" value="{$bike_info.user_id}" />
    <div class="type_two">
        <div class="title">浮动方式 
            <label for="">
                <i class="iconfont icon-zuoyoujiantou2"></i>
                <select id="float_type" name="info[float_type]" onchange="if(this.value == '1')$('#float_cash').val('0');" dir="rtl">
                    <option value="">选择浮动方式</option>
                    <option value="1">不浮动</option>
                    <option value="2">向上浮动</option>
                    <option value="3">向下浮动</option>
                </select>
            </label>
        </div>
        <div class="title">浮动金额
            <label for="">
                <input id="float_cash" name="info[float_cash]" type="number" oninput="if($('#float_type').val() == '1')this.value='0';" placeholder="输入金额" dir="rtl">
            </label>
        </div>
    </div>
    <div class="Problem">
        <div class="title">出让描述</div>
        <label for="">
            <textarea name="info[profile]" cols="30" rows="10" placeholder="请您在此描述出让详情"></textarea>
            <span><i class="Max_num">0</i>/300</span>
        </label>
    </div>
    <div class="up_img">
        <div class="title">上传照片</div>
        <div class="content clear">
            <!--上传图片-->
            <label for="">
                <input name="bike_pic" type="file">
                <input type="hidden" name="info[pics][]" value="/Public/home/image/bike_show2.jpg"/>
                <i class="iconfont icon-plus" style="background-image: url(__PUBLIC__/home/image/bike_show2.jpg)"></i>
            </label>
            <label for="">
                <input name="bike_pic" type="file">
                <input type="hidden" name="info[pics][]" value="/Public/home/image/bike_show3.jpg"/>
                <i class="iconfont icon-plus" style="background-image: url(__PUBLIC__/home/image/bike_show3.jpg)"></i>
            </label>
            
            <!--上传图片-->
        </div>
    </div>
    <div class="Prompt"><i class="iconfont icon-zhuyi"></i>为了帮助我们更好的解决问题，请上传清晰商品清晰照片,最多6张。</div>
    <div class="type_two">
        <div class="title">卖家联系方式</div>
        <div class="title">手机号
            <label for="">
                <input name="info[mobile]" type="number" placeholder="输入手机号码" dir="rtl" maxlength="11">
            </label>
        </div>
        <div class="title">微信
            <label for="">
                <input name="info[weixin]" type="text" placeholder="输入您的微信账号" dir="rtl">
            </label>
        </div>
        <div class="title">QQ
            <label for="">
                <input name="info[qq]" type="number" placeholder="输入您的QQ账号" dir="rtl">
            </label>
        </div>
    </div>
    </form>
    <div class="Prompt"><i class="iconfont icon-zhuyi"></i>留下您的联系方式，必填一项</div>
    <div class="empty_3rem"></div>
    <button class="fiexd_button">提交</button>
</div>
<script type="text/javascript">
$(function () {
    $("textarea").change(function () {
        var that = this;
        var shuzi=$(this).val().length;
        if(shuzi<=300){
            $(".Max_num").html(shuzi);
        }else{
            $(".Max_num").html(300);
            var str=$(that).val();
            $(that).val(str.slice(0,300));
        }
    });
    var is_sub = false;
    $('.fiexd_button').click(function(){
    	if(is_sub){
    		return false;
    	}else{
    		is_sub = true;
    	}
    	$.post('{:U("Bike/turn_info")}',$('#dataForm').serializeArray(),function(data){
    		layer.msg(data.info);
    		if(data.url != '')setTimeout("location.href='"+data.url+"'",1000);
    		if(data.status == '0')is_sub = false;
    	});
    });
})
</script>
<include file="Public/foot"/>